home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!usenet
- From: GHouck <hksys@teleport.com>
- Newsgroups: comp.lang.c
- Subject: Re: NT CGI script
- Date: 18 Apr 1996 07:18:00 GMT
- Organization: systems hk
- Message-ID: <4l4qb8$r1v@nadine.teleport.com>
- References: <3172E7F9.3D39@joseph.dswnet.com>
- NNTP-Posting-Host: ip-pdx07-11.teleport.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
-
- Joseph Altea <joseph@joseph.dswnet.com> wrote:
- >I have the desire to read from stdin under NT (Symantec 7.2) C compiler.
- >I need to read stdin as a BINARY, NT seems to think stdin is always TEXT
- >mode.
- >
- >joseph@joseph.dswnet.com
-
- Joseph,
- I don't know if your compiler has an equivalent or whether it
- is standard C, but the following works to put either stdin
- or stdou into a binary mode:
-
- if( fInp == stdin )
- setmode( 0,O_BINARY );
- if( fOut == stdout )
- setmode( 1,O_BINARY );
-
- Yours, Geoff Houck
-
-